<!DOCTYPE html>
<meta charset="utf-8">
<style>

.line {
  fill: none;
  stroke: steelblue;
  stroke-width: 1.5px;
}

</style>
<body>
<script src="../../d3.v2.js"></script>
<script>

var data = d3.range(120).map(function(i) {
  return i % 10
      ? .8 + Math.sin(i / 3 * Math.PI) / 6
      : null;
});

var width = 960,
    height = 500;

var radius = d3.scale.linear()
    .domain([0, 1])
    .range([height / 3, height / 2]);

var angle = d3.scale.linear()
    .domain([0, data.length])
    .range([0, 2 * Math.PI]);

var line = d3.svg.line.radial()
    .defined(function(d) { return d != null; })
    .interpolate("basis")
    .radius(radius)
    .angle(function(d, i) { return angle(i); });

var svg = d3.select("body").append("svg")
    .datum(data)
    .attr("width", width)
    .attr("height", height)
  .append("g")
    .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");

svg.append("path")
    .attr("class", "line")
    .attr("d", line);

</script>
